package com.marry.dubbo;

import com.marry.dubbo.api.UserService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Arrays;

/**
 * @author ml
 * @create 2018-03-02--15:08
 */
public class consumer1 {

    public static void main(String[] args) {

        ClassPathXmlApplicationContext context=new ClassPathXmlApplicationContext("dubbo-consumer.xml");
        context.start();
        System.out.println("consumer start");
        System.out.println(Arrays.asList(context.getBeanDefinitionNames()));
        UserService userService=context.getBean(UserService.class);

        System.out.println(userService.sayHello("马林"));

    }
}
